/*
 * garage.h
 *
 *  Created on: 2023骞�5鏈�12鏃�
 *      Author: 0
 */

#ifndef CODE_GARAGE_H_
#define CODE_GARAGE_H_

#include "zf_common_headfile.h"

enum garage_type_e
{
    GARAGE_NONE = 0,                            // 闈炲渾鐜ā寮�
    GARAGE_LEFT_IN,GARAGE_RIGHT_IN,
    GARAGE_LEFT_END,GARAGE_RIGHT_END,
    GARAGE_NUM,
};

int check_jump_point (char mode);
void garage_check (void);
void run_garage (void);

enum stop_car_type_e
{
    STOP_NONE = 0,
    STOP_CAR,
    STOP_NUM
};

extern const char* stop_car_type_name[STOP_NUM];
extern enum stop_car_type_e stop_car_type;

extern float stop_aim_distance;

void check_stop_car();
void stop_car();


extern enum garage_type_e garage_type; //= CIRCLE_NONE;

extern int gipts0[POINTS_MAX_LEN][2]; //宸﹁竟绾�
extern int gipts1[POINTS_MAX_LEN][2]; //鍙宠竟绾�
extern int gipts0_num, gipts1_num;

extern float grpts0[POINTS_MAX_LEN][2];  //閫嗛�忚鍖栧悗宸﹁竟绾�
extern float grpts1[POINTS_MAX_LEN][2];  //閫嗛�忚鍖栧悗鍙宠竟绾�
extern int grpts0_num, grpts1_num;

extern float grpts0b[POINTS_MAX_LEN][2];  //婊ゆ尝鍚庡乏杈圭嚎
extern float grpts1b[POINTS_MAX_LEN][2];  //婊ゆ尝鍚庡彸杈圭嚎
extern int grpts0b_num, grpts1b_num;

extern float grpts0s[POINTS_MAX_LEN][2];  //绛夎窛閲囨牱宸﹁竟绾�
extern float grpts1s[POINTS_MAX_LEN][2];  //绛夎窛閲囨牱鍙宠竟绾�
extern int grpts0s_num, grpts1s_num;

extern float grpts0a[POINTS_MAX_LEN];  //灞�閮ㄨ搴﹀彉鍖栫巼宸﹁竟绾�
extern float grpts1a[POINTS_MAX_LEN];  //灞�閮ㄨ搴﹀彉鍖栫巼鍙宠竟绾�
extern int grpts0a_num, grpts1a_num;

extern float grpts0an[POINTS_MAX_LEN];  //瑙掑害鍙樺寲鐜囬潪鏋佸ぇ鎶戝埗宸﹁竟绾�
extern float grpts1an[POINTS_MAX_LEN];  //灞�瑙掑害鍙樺寲鐜囬潪鏋佸ぇ鎶戝埗鍙宠竟绾�
extern int grpts0an_num, grpts1an_num;

extern float grptsc0[POINTS_MAX_LEN][2];  //宸︿腑绾�
extern float grptsc1[POINTS_MAX_LEN][2];  //鍙充腑绾�
extern int grptsc0_num, grptsc1_num;


extern int g_Lpt1_c_x, g_Lpt1_c_y, g_temp_line, g_temp_l, g_temp_2;
extern int Lpt0_garage_id , Lpt1_garage_id , gx1 , gy1 , gx0 , gy0 ;
extern bool Lpt0_garage_found, Lpt1_garage_found;

#endif /* CODE_GARAGE_H_ */
